﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Group3.Data.Interface
{
    public class DataLine
    {

        public DataLine(String s)
        {
            String[] _testArr;
            _testArr = s.Split(';');

            _activity = _testArr[0];
            _classname = _testArr[1];
            _attributeName = _testArr[2];
            _attributeDataType = _testArr[3];
            _attributeType = _testArr[4];

        }

        public DataLine(String pAct, String pClassname, String pAttributename, String pAttributeDataType, String pAttributeType)
        {
            _activity = pAct;
            _classname = pClassname;
            _attributeName = pAttributename;
            _attributeDataType = pAttributeDataType;
            _attributeType = pAttributeType;
        }

        String _activity;
        public String Activity
        {
            get { return _activity; }
            set { _activity = value; }
        }

        String _classname;
        public String Classname
        {
            get { return _classname; }
            set { _classname = value; }
        }

        String _attributeName;
        public String AttributeName
        {
            get { return _attributeName; }
            set { _attributeName = value; }
        }

        String _attributeDataType;
        public String AttributeDataType
        {
            get { return _attributeDataType; }
            set { _attributeDataType = value; }
        }

        String _attributeType;
        public String AttributeType
        {
            get { return _attributeType; }
            set { _attributeType = value; }
        }

        public int AttributeTypeInt
        {
            get { return Convert.ToInt32(_attributeType); }
        }

        public override string ToString()
        {
            return Activity + ";" + Classname + ";" + AttributeName + ";" + AttributeDataType + ";" + AttributeType + Environment.NewLine;
        }

    }
}
